<template lang="html">
	<div class="">

	</div>
</template>

<script>
export default {
	beforeCreate() {

		//获取用户信息
		const publicList = ['/login', '/register']
		const pathName = this.$router.currentRoute.path;
		if (publicList.indexOf(pathName) > -1) {
			return null
		}
		this.$http('/api/user/info').then(res => {
			if (res.status == 200) {
				if (res.data.code == 0) {
					//有登录信息
				} else {
					console.log();
					this.$router.push('login')
				}
			}
			console.log(res.data)
			alert(1)

		})

		//是否登录


		//现在的url login 不需要跳转


		//用户的身份

		//用户完善信息否
	}
}
</script>

<style lang="css">
</style>
